package com.itheima.Demo;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class Demo对象输入流 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("Day17codes\\aaa\\123.txt"));
        Object o = ois.readObject();
        //需要向下转型;
        Student stu = (Student)o;
        System.out.println(o);
        ois.close();
    }
}
